home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / gnu / gplot3_2.lha / gnuplot / term / aed.trm next >
Text File  |  1992-03-25  |  2KB  |  122 lines

  1. /*
  2.  * $Id: aed.trm,v 3.26 92/03/24 22:34:46 woo Exp Locker: woo $
  3.  */
  4.  
  5. /* GNUPLOT - aed.trm */
  6. /*
  7.  * Copyright (C) 1990, 1991, 1992
  8.  *
  9.  * Permission to use, copy, and distribute this software and its
  10.  * documentation for any purpose with or without fee is hereby granted, 
  11.  * provided that the above copyright notice appear in all copies and 
  12.  * that both that copyright notice and this permission notice appear 
  13.  * in supporting documentation.
  14.  *
  15.  * Permission to modify the software is granted, but not the right to
  16.  * distribute the modified code.  Modifications are to be distributed 
  17.  * as patches to released version.
  18.  *  
  19.  * This software  is provided "as is" without express or implied warranty.
  20.  * 
  21.  * This file is included by ../term.c.
  22.  *
  23.  * This terminal driver supports:
  24.  *   AED terminals
  25.  *
  26.  * AUTHORS
  27.  *     Colin Kelley, Thomas Williams, Russell Lang
  28.  *
  29.  * send your comments or suggestions to (info-gnuplot@ames.arc.nasa.gov).
  30.  * 
  31.  */
  32.  
  33. #define AED_XMAX 768
  34. #define AED_YMAX 575
  35.  
  36. #define AED_XLAST (AED_XMAX - 1)
  37. #define AED_YLAST (AED_YMAX - 1)
  38.  
  39. #define AED_VCHAR    13
  40. #define AED_HCHAR    8
  41. #define AED_VTIC    8
  42. #define AED_HTIC    7
  43.  
  44. /* slightly different for AED 512 */
  45. #define AED5_XMAX 512
  46. #define AED5_XLAST (AED5_XMAX - 1)
  47.  
  48. AED_init()
  49. {
  50.     fprintf(outfile,
  51.     "\033SEN3DDDN.SEC.7.SCT.0.1.80.80.90.SBC.0.AAV2.MOV.0.9.CHR.0.FFD");
  52. /*   2            3     4                5     7    6       1
  53.     1. Clear Screen
  54.     2. Set Encoding
  55.     3. Set Default Color
  56.     4. Set Backround Color Table Entry
  57.     5. Set Backround Color
  58.     6. Move to Bottom Lefthand Corner
  59.     7. Anti-Alias Vectors
  60. */
  61. }
  62.  
  63.  
  64. AED_graphics()
  65. {
  66.     fprintf(outfile,"\033FFD\033");
  67. }
  68.  
  69.  
  70. AED_text()
  71. {
  72.     fprintf(outfile,"\033MOV.0.9.SEC.7.XXX");
  73. }
  74.  
  75.  
  76.  
  77. AED_linetype(linetype)
  78. int linetype;
  79. {
  80. static int color[2+9] = { 7, 1, 6, 2, 3, 5, 1, 6, 2, 3, 5 };
  81. static int type[2+9] = { 85, 85, 255, 255, 255, 255, 255, 85, 85, 85, 85 };
  82.  
  83.     if (linetype >= 10)
  84.         linetype %= 10;
  85.     fprintf(outfile,"\033SLS%d.255.",type[linetype+2]);
  86.     fprintf(outfile,"\033SEC%d.",color[linetype+2]);
  87. }
  88.  
  89.  
  90.  
  91. AED_move(x,y)
  92. int x,y;
  93. {
  94.     fprintf(outfile,"\033MOV%d.%d.",x,y);
  95. }
  96.  
  97.  
  98. AED_vector(x,y)
  99. int x,y;
  100. {
  101.     fprintf(outfile,"\033DVA%d.%d.",x,y);
  102. }
  103.  
  104.  
  105. AED_put_text(x,y,str)
  106. int x,y;
  107. char str[];
  108. {
  109.     AED_move(x,y - AED_VCHAR/2 + 2);
  110.     fprintf(outfile,"\033XXX%s\033",str);
  111. }
  112.  
  113.  
  114. #define hxt (AED_HTIC/2)
  115. #define hyt (AED_VTIC/2)
  116.  
  117. AED_reset()
  118. {
  119.     fprintf(outfile,"\033SCT0.1.0.0.0.SBC.0.FFD");
  120. }
  121.  
  122.